$('#btn').on('click',function () {
    var table=window.document.getElementById("password");
    var ss=new Object();
    ss.oldpassword=document.getElementById("old").value;
    ss.password=document.getElementById("new").value;
    ss.password2=document.getElementById("sure").value;
    $.ajax({
            type:'PUT',
            dataType:'json',
            contentType: "application/json; charset=utf-8",
            url:contextPath+"learner/updatepsd",
            data:JSON.stringify(ss),
            success:function (data) {
              console.log(data);
              alert(data.message)
            }
            ,
            error:function () {
                alert("修改失败")
            }
    })
});
$('#res').on('click',function () {
    var table=window.document.getElementById("password");
    document.getElementById("old").value="";
    document.getElementById("new").value="";
    document.getElementById("sure").value="";
});